package com.holly.unit.deform.api.pojo.online.pojo;

import com.holly.unit.core.pojo.request.BaseRequest;
import com.holly.unit.scanner.api.annotation.field.ChineseDescription;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.util.Map;

/**
 * 类描述:
 *
 * @author fxr
 * @version 1.0.0
 * @date 2022/4/11 9:48
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class DesignFormDataPojo extends BaseRequest {

    @NotNull(message = "业务数据库表不能为空", groups = {addFormData.class,editFormData.class,queryList.class,delete.class,batchDelete.class})
    @ChineseDescription("业务数据库表")
    private String tableName;
    @NotNull(message = "业务数据库表字段值不能为空", groups = {addFormData.class,editFormData.class})
    @ChineseDescription("业务数据库表字段值")
    private Map<String,Object> formDataMap;

    @NotNull(message = "业务数据主键id值不能为空",groups = {editFormData.class,delete.class})
    @ChineseDescription("业务数据主键id值")
    private String tableId;

    @NotNull(message = "业务数据库表字段不能为空", groups = {addFormData.class,editFormData.class})
    @ChineseDescription("业务数据库表字段")
    private String filedNames;

    @NotNull(message = "业务数据库表字段不能为空", groups = {batchDelete.class})
    @ChineseDescription("业务数据库表字段")
    private String ids;

    private String superQuery;

    /**
     * 参数校验分组：添加草稿校验
     */
    public @interface editFormData {
    }


    /**
     * 参数校验分组：添加草稿校验
     */
    public @interface addFormData {
    }

    /**
     * 参数校验分组：添加草稿校验
     */
    public @interface queryList {
    }


}
